
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker


db_url = "mysql+pymysql://gkl:qwe123@127.0.0.1:3306/tornado?charset=utf8"
engine = create_engine(db_url)
Base = declarative_base(engine)
Session = sessionmaker(engine)
session = Session()

if __name__ == '__main__':
    connection = engine.connect()
    result = connection.execute("select 3")
    print(result.fetchone())
